Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Keep newlines in synthetic responses #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cfarvidson
Copy link

We would like to return a multiline synthetic response from ORM and this should keep the newlines when generating the varnish configuration.

I'll be honest, my knowledge about varnish is really small but I think that this should be safe to do. (https://book.varnish-software.com/4.0/chapters/VCL_Subroutines.html#vcl-vcl-synth)

I can't really test this end to end but maybe that's something that the maintainers can help me with?

Signed-off-by: Carl-Fredrik Arvidson <[email protected]>
@cfarvidson
Copy link
Author

The travis issue: #53

@splushii
Copy link

Thanks for the contribution! Much apreesh!

Yes, let's get the build/e2e/CI going again, then add some e2e tests to see how it works when going the whole way into the Varnish conf.

@cfarvidson
Copy link
Author

I got a bit confused on how to write a test that would test the synthetic response end-to-end.

Can I just create a new file (like https://github.com/cfarvidson/orm/blob/keep-newlines-for-synthetic-responses/orm-rules-tests/rules-test/rules/test_domain_default.yml for example) and then test the response?

Are there any good examples that tests synthetic responses at the moment?

@ghost
Copy link

ghost commented Apr 28, 2021

Yes, you can just create a new file with test rules. Currently the https://github.com/svt/orm/blob/master/orm-rules-tests/rules-test/rules/test_ignore_case.yml uses the feature to test matching logic, so you should be able to copy the approach from there to test the new functionality specifically.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants